/**
 * @author 35326
 * @date 2021/3/9 21:58
 */
import java.util.Stack;
public class StackSearchMethodExample
{
    public static void main(String[] args)
    {
        Stack<String> stk= new Stack<>();
//pushing elements into Stack
        stk.push("Mac Book");
        stk.push("HP");
        stk.push("DELL");
        stk.push("Asus");
        System.out.println("Stack: " + stk);
// Search an element
        int location = stk.search("HP");
        System.out.println("Location of Dell: " + location);
        System.out.println(stk.search("a"));
        System.out.println(stk.search("Asus"));
    }
}
